<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>


	<%
		String ctxpath = request.getContextPath();
		Class.forName("com.mysql.jdbc.Driver");
		String url = "jdbc:mysql://192.168.10.21:3306/signon";
		String user = "cnitr";
		String password = "cnitr";
		Connection conn = DriverManager.getConnection(url, user, password);
		//ireport生成的.jasper文件的存放位置，这里为了方便放置在根目录下面  
		File reportFile = new File(this.getServletContext().getRealPath("/report1.jasper"));
		Map parameters = new HashMap();
		parameters.put("mobile","13652874952");
		try {
			//执行报表程序  
			//JasperRunManager.runReportToHtmlFile(reportFile.getPath(), parameters, conn);
			response.sendRedirect(ctxpath + "/report1.html");
		} catch (Exception e) {
			System.out.println(e.getMessage());
		} finally {
			try {
				conn.close();
			} catch (Exception ex) {
				System.out.println(ex.getMessage());
			}

		}
	%>
</body>
</html>